home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programmer's Power Pack / Delphi Volume 1.iso / s_to_z / statone / unit2.pas < prev   
Pascal/Delphi Source File  |  1996-09-15  |  511b  |  32 lines

  1. unit Unit2;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls;
  8.  
  9. type
  10.   TForm2 = class(TForm)
  11.     Memo1: TMemo;
  12.     procedure FormKeyPress(Sender: TObject; var Key: Char);
  13.   private
  14.     { Private declarations }
  15.   public
  16.     { Public declarations }
  17.   end;
  18.  
  19. var
  20.   Form2: TForm2;
  21.  
  22. implementation
  23.  
  24. {$R *.DFM}
  25.  
  26. procedure TForm2.FormKeyPress(Sender: TObject; var Key: Char);
  27. begin
  28.     if ord(key) = 27 then close;
  29. end;
  30.  
  31. end.
  32.